using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace KS.DataWrapper.Interface
{
    public interface IBaseRepository<T> where T : IDataClass, new()
    {
        IQueryable<T> GetAll();

        T GetBy(Expression<Func<T, bool>> filter);

        T AddNew(T entity);

        IEnumerable<T> AddRangeNew(IEnumerable<T> entityList);

        T Update(T entity);

        bool Delete(T entity);

        object DynamicLinq(string linq);

        long Count();
    }
}